#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main()
{
    printf("父进程开始运行,pid:%d\n",getpid());
    fork();
    printf("进程开始运行,pid:%d\n",getpid());

    //chdir("/home/user1");
    //fopen("hello.txt","a");
    //while(1)
    //{
    //    sleep(1);
    //    printf("我是一个进程!,我的pid:%d,我的父进程id:%d\n",getpid(),getppid());
    //}
}
